from masoniteorm.relationships import belongs_to

from application.config import appSettings
from ..base import BaseModel


class TenantGoodRelation(BaseModel):
    __connection__ = 'postgres'
    __table__ = appSettings.db_code_prefix + 'tenant_good_relations'

    @belongs_to('code', 'code')
    def brand(self):
        from ..oem.Company import Company
        return Company

    @belongs_to('theme_code', 'theme_code')
    def theme(self):
        from .TenantTemplate import TenantTemplate
        return TenantTemplate


__all__ = ['TenantGoodRelation']
